import Mock from 'mockjs';

const lunbo=[];

for(var i=0;i<5;i++){
	lunbo.push(Mock.mock({
		id:Math.floor(Math.random()*100),
		url:Mock.Random.image("300x200 "),
		imgurl:Mock.Random.url('http')
		
	}))
	
}
const recommend=[];
var xiaoguo=["美白","减肥","美容","排毒","补水","养生","祛痘"]
for(var i=0;i<25;i++){
	let m=Math.floor(Math.random()*7)
	let n=Math.floor(Math.random()*7)
	let p=Math.floor(Math.random()*1000+100)
	let s=Math.floor(Math.random()*1000)
	recommend.push(Mock.mock({
		id:i,
		name:Mock.Random.name(),
		content:[xiaoguo[m],xiaoguo[n]],
		imgurl:Mock.Random.image("300x200 "),
		price:p,
		sale:p-58,
		add:Mock.Random.region()+"包邮",
		count:s
		
	}))
	
}
const user=[
	{
		tel:"12345678911",
		password:'12345',
		name:Mock.Random.cname(),
		avatar: 'https://raw.githubusercontent.com/taylorchen709/markdown-images/master/vueadmin/user.png',
		token:Mock.Random.guid()
	}

];
const tui = [];
var arr = ["日本H2D2","日本H2D2","日本H2D2","日本H2D2","日本H2D2","日本H2D2"]
	for(var i=0;i<15;i++){
		let n=Math.floor(Math.random()*5)
		let p=Math.floor(Math.random()*1000+100)
		
			tui.push(Mock.mock({
				//名字 唯一的
				id:i,
				name:Mock.Random.name(),
				content:[arr[n]],
				//图片
				imgurl:Mock.Random.image("300x200"),
				//价格
				price:p,
				//促销价格
				sale:p*50,
				baoshui:"保税区"
			
			}))
		}
	
const muen = [];
var arr = ["买一发二原品","保险系统用酒,低价品鉴！","买一送一","价格做好,制作最好"]
	for(var i=0;i<20;i++){
		let n=Math.floor(Math.random()*5)
		let p=Math.floor(Math.random()*1000+100)
			muen.push(Mock.mock({
				//名字 唯一的
				id:i,
				name:Mock.Random.name(),
				content:[arr[n]],
				//图片
				imgurl:Mock.Random.image("180x200"),
				//价格
				price:p,
				//促销价格
				sale:p*60,
				buy:"立即购买"
			
			}))
		}
	

	
	
	const pinglun = [];
for(var i = 0;i<25;i++){
	pinglun.push(Mock.mock({
	   url:Mock.Random.image('50x50'),
	   imgurl:Mock.Random.url('http'),
   	   data:"2015-12-15",
   	   hua:Mock.Random.name(),
   	   name:Mock.Random.cname()
	}))
}

const canshu = [];
for(var i = 0;i<25;i++){
	canshu.push(Mock.mock({
   	   hua:Mock.Random.name(),
   	   name:Mock.Random.cname()
	}))
}
export {lunbo,recommend,user,tui,pinglun,canshu,muen};
